#ifndef OBMOVING_H
#define OBMOVING_H

#include "d3dx9.h"
#include "ObObject.h"

class ObMoving : public ObObject{
public:
	ObMoving();

	void updateMoving(float dt, float dtx, float dty);

	void setAcceleration(D3DXVECTOR3& accel);
	void setVelocity(D3DXVECTOR3& vel);
	void isXAxisGravity(bool enable);
	void isYAxisGravity(bool enable);
	void isTurnAround(bool enable);

	D3DXVECTOR3& getAcceleration();
	D3DXVECTOR3& getVelocity();
	D3DXVECTOR3& getOldPos();
	bool		 getXAxisGravity();
	bool		 getYAxisGravity();
	bool		 getIsTurnAround();
	void		 setIsJump(bool isjump);
	float MAX_VELOCITYX;
	float MAX_VELOCITYY;

	float XAXISGRAVITY;
	float YAXISGRAVITY;

	static float DEFAULTSPEED_X;
	static float DEFAULTSPEED_Y;
	bool		mIsJump;
protected:
	D3DXVECTOR3	mAcceleration;
	D3DXVECTOR3	mVelocity;
	bool		mIsYGravity;
	bool		mIsXGravity;
	bool		mIsTurnAround; 
	bool		mUpdateMoving;
};

#endif